/*
 * @Author: hongbin
 * @Date: 2023-01-25 10:58:14
 * @LastEditors: hongbin
 * @LastEditTime: 2023-05-21 22:00:52
 * @Description:
 */
import { ThreeHelper } from "@/ThreeHelper";
import { FC } from "react";
import { Container } from ".";
import { NextSEO } from "../NextSEO";
import Canvas from "./Canvas";
import { css } from "styled-components";

interface IProps {
    init: (helper: ThreeHelper) => void;
    seoTitle?: string;
    destroy?: VoidFunction;
    style?: ReturnType<typeof css>;
}

const Layout: FC<IProps> = ({ init, seoTitle, destroy, style }) => {
    return (
        <Container>
            <NextSEO title={seoTitle} />
            <Canvas style={style} init={init} destroy={destroy} />
        </Container>
    );
};

export default Layout;
